package com.huirui.server.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@Schema(description = "用户优惠券视图对象，用于展示用户相关的优惠券信息")
public class UserCouponVo {

    @Schema(description = "用户优惠券关联记录ID", example = "1001")
    private Long id;

    @Schema(description = "用户的优惠券ID")
    private Long userCouponId;

    @Schema(description = "优惠券名称", example = "满199减50元券")
    private String couponName;

    @Schema(description = "优惠券类型，0-无门槛，1-满减券")
    private Integer couponType;

    @Schema(description = "优惠券使用范围,0-通用，1-品类券，2-商品券")
    private Integer couponApplicability;

    @Schema(description = "优惠券状态，0-未领取，1-领券已达到上限，2-已领完")
    private Integer couponStatus;

    @Schema(description = "优惠券使用状态，0-未使用，1-已使用，2-已过期，4-未开始")
    private Integer couponUseStatus;

    @Schema(description = "优惠券面额（单位：元）", example = "50.00")
    private BigDecimal denomination;

    @Schema(description = "优惠券使用门槛（单位：元，-1表示无门槛）", example = "199.00")
    private BigDecimal couponThreshold;

    @Schema(description = "有效期类型")
    private Integer validType;

    @Schema(description = "有效期")
    private Integer validDays;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "优惠券可用开始时间", example = "2024-01-01 00:00:00")
    private LocalDateTime availableStartTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "优惠券可用结束时间", example = "2024-02-15 23:59:59")
    private LocalDateTime availableEndTime;

    @Schema(description = "使用时间")
    private LocalDateTime useTime;
}
